home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / ODF Release 3 / ODFDev / Embed / Sources / Content.h < prev    next >
Encoding:
Text File  |  1996-12-16  |  3.6 KB  |  126 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Content.h
  4. //    Release Version:    $ ODF 3 $
  5. //
  6. //    Author:                M.Boetcher
  7. //
  8. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef CONTENT_H
  13. #define CONTENT_H
  14.  
  15. // ----- FrameWork Includes -----
  16.  
  17. #ifndef FWCONTNT_H
  18. #include "FWContnt.h"
  19. #endif
  20.  
  21. //========================================================================================
  22. //    Forward Declarations
  23. //========================================================================================
  24.  
  25. class CEmbedPart;
  26. class CEmbedProxy;
  27.  
  28. //========================================================================================
  29. //    class CEmbedContent
  30. //========================================================================================
  31.  
  32. class CEmbedContent : public FW_CContent
  33. {
  34. //----------------------------------------------------------------------------------------
  35. //    Initialization/Destruction
  36. //
  37.   public:
  38.     FW_DECLARE_AUTO(CEmbedContent)
  39.     
  40.     CEmbedContent(Environment* ev, CEmbedPart* part);
  41.  
  42.     virtual ~CEmbedContent();
  43.  
  44. //----------------------------------------------------------------------------------------
  45. //    Inherited API
  46. //
  47.   public:
  48.     virtual void        ExternalizeKind(Environment* ev,
  49.                                     ODStorageUnit* storageUnit,
  50.                                     FW_CKind* kind,
  51.                                     FW_StorageKinds storageKind,
  52.                                      FW_CPromise* promise,
  53.                                     FW_CCloneInfo* cloneInfo);
  54.     virtual FW_Boolean    InternalizeKind(Environment* ev,
  55.                                      ODStorageUnit* storageUnit, 
  56.                                      FW_CKind* kind,
  57.                                      FW_StorageKinds storageKind,
  58.                                      FW_CCloneInfo* cloneInfo);
  59.  
  60.     virtual void        IncorporateEmbeddedFrame(Environment* ev,
  61.                                     FW_CEmbeddingFrame* scopeFrame,
  62.                                     ODFrame* odEmbeddedFrame,
  63.                                     ODShape* suggestedShape,
  64.                                     ODTypeToken viewType);
  65.     virtual void        IncorporateEmbeddedPart(Environment* ev,
  66.                                     FW_CEmbeddingFrame* scopeFrame,
  67.                                     ODPart* odEmbeddedPart, 
  68.                                     ODShape* suggestedShape,
  69.                                     ODTypeToken viewType);
  70.  
  71.     virtual FW_MProxy*    IsDataOnlyOneProxy(Environment* ev) const;
  72.  
  73. //----------------------------------------------------------------------------------------
  74. //    New API
  75. //
  76.   public:
  77.     CEmbedProxy*         GetProxy() const;
  78.     void                 SetProxy(CEmbedProxy* proxy);
  79.  
  80.     void                ReplaceProxy(Environment* ev, CEmbedProxy* newProxy);
  81.  
  82.     void                Rotate(Environment* ev);
  83.     void                ChangeFacetNumber(Environment* ev, short facetNumber);
  84.         
  85.     short                GetRotation() const
  86.                             {return fRotation;}
  87.     short                GetFacetNumber() const
  88.                             {return fFacetNumber;}
  89.                             
  90. //----------------------------------------------------------------------------------------
  91. //    Data Members
  92. //
  93.   private:
  94.     CEmbedPart*            fEmbedPart;
  95.  
  96.     short                fFacetNumber;
  97.     short                fRotation;
  98.     
  99.     //--- part content data
  100.     CEmbedProxy*        fProxy;
  101. };
  102.  
  103. //========================================================================================
  104. //    CEmbedContent Inlines
  105. //========================================================================================
  106.  
  107. //----------------------------------------------------------------------------------------
  108. //    CEmbedContent::GetProxy
  109. //----------------------------------------------------------------------------------------
  110.  
  111. inline CEmbedProxy* CEmbedContent::GetProxy() const
  112. {
  113.     return fProxy;
  114. }
  115.  
  116. //----------------------------------------------------------------------------------------
  117. //    CEmbedContent::SetProxy
  118. //----------------------------------------------------------------------------------------
  119.  
  120. inline void CEmbedContent::SetProxy(CEmbedProxy* proxy)
  121. {    
  122.     fProxy = proxy;
  123. }
  124.  
  125. #endif
  126.